package com.huaxiafinance.management.mapper;

import com.huaxiafinance.management.dto.request.QueryRoleDto;
import com.huaxiafinance.management.model.Permission;
import com.huaxiafinance.management.model.User;
import com.huaxiafinance.management.model.UserExample;
import com.huaxiafinance.management.model.UserRole;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
	int countByExample(UserExample example);

	int deleteByExample(UserExample example);

	int deleteByPrimaryKey(Integer id);

	int insert(User record);
	int insertNew(User record);

	int insertSelective(User record);

	List<User> selectByExample(UserExample example);

	User selectByPrimaryKey(Integer id);

	int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example);

	int updateByExample(@Param("record") User record, @Param("example") UserExample example);

	int updateByPrimaryKeySelective(User record);

	int updateByPrimaryKey(User record);

	User login(String userName);

	List<UserRole> queryUserRole(Integer id);

	User beforUpdateUser(Integer id);
	
	List<Permission> permissionList(Integer id);
	
	User selectSaleMan(String userName);
	
	List<User> queryUser(QueryRoleDto dto);

    List<User> selectUserList();
    User selectOne(@Param("id")Integer id);


	User selectById(Integer id);
}